<template>
  <div>
    <el-pagination
      background
      layout="prev, pager, next,sizes"
      :page-sizes="[10, 25, 50, 100]"
      :current-page="currentPage"
      :page-size="pageSize"
      :total="totalNum"
      @current-change="currentChange"
      @size-change="sizeChange"
    />
  </div>
</template>

<script>
export default {
  data () {
    return {
      currentPage: 1,
      pageSize: 10,
      totalNum: 100
    }
  },
  methods: {
    // 分页Change
    currentChange (value) {
      console.log(value)
      this.currentPage = value
      this.$emit('loadData')
    },
    sizeChange (value) {
      console.log(value)
      this.pageSize = value
      this.$emit('loadData')
    }
  }
}
</script>

<style></style>
